Hide minor edits - Show changes to output
TEMPORARILY UNAVAILABLE!Multiple multiplayer objectives, tutorial
This tutorial will combine the [[ObjectiveExplosion]] and [[ObjectiveTheft]] objective tutorials into a map with multiple objectives of multiple types.
Oh yeah, you'll probably want to put the objective somewhere, so I recommend building a map, made up only of one small room ( To minimize compile times while you are learning ). All ''red words'' below are keywords that should not be changed, the rest you can change as much as you like.
This tutorial includes a complete set of .map .bsp and .scr files, that can be downloaded here: Attach:multiple_obj_test.zip ( 25 kb ).
# Do the [[ObjectiveExplosion]] tutorial.
# Do the [[ObjectiveTheft]] tutorial.
# Get confused and wonder how to solve the win-conditions.
# Smile and read on:
Use the exploder system's varaiable ''level.targets_destroyed'' and set the variable ''level.targets_to_destroy'' to 2 ( one bomb and one document ). This way there is no need to change the allies win method from the [[ObjectiveExplosion]] tutorial:
----
// Allied victory test
allies_win_bomb:
// While undestroyed objectives left
while(level.targets_destroyed < level.targets_to_destroy) {
// chill out
waitframe
}
// No objectives left allies win
teamwin allies
end // end allied victory test
----
But what about the document? Well... that needs a change from the [[ObjectiveTheft]] tutorial. The '''desk_document_check''' method from the [[ObjectiveTheft]] tutorial will work if you just replace the '''teamwin allies''' line with a line that just adds 1 to the ''level.targets_destroyed'' when a document is stolen:
----
// Document checks
desk_document_check:
while(1) { // forever
// Dont execute past this line
// until someone triggers the object
$documents_trigger waittill trigger
// parm.other is the triggerer
if(parm.other.dmteam == allies) {
// Make the document graphix disappear
$documents hide
// Tell the win method that an
// objective has been completed
level.targets_destroyed ++ // ++ adds 1
// break out of the while loop
break
}
// protection against making this
// thread use too much CPU
waitframe
}
end // end document checks
----
OK, this will now work for any number of bomb objectives ( just add 1 to the ''level.targets_to_destroy'' for every bomb ) as the exploder system ( exploder.scr ) can handle this. But say you want to add another document theft objective, will that also work? Well, yes and no: Using the ''level.targets_destroyed'' will work for any number of objectives, but in the '''desk_document_check''' method we use use the command '''$documents hide''' to remove the documents from the game, and this makes the method specific to exactly one document. So lets make the method a bit more geneal to make it work with any number of documents ( or any trigger that makes someting disappear, it does not have to be documents ):
----
document_check:
while(1) { // forever
// Dont execute past this line
// until someone triggers the object
self waittill trigger
// parm.other is the triggerer
if(parm.other.dmteam == allies) {
// Make the document graphix disappear
self.target hide
// Tell the win method that an
// objective has been completed
level.targets_destroyed ++ // ++ adds 1
break // out of while loop
}
waitframe // protection
}
end
----
So?... Whats the difference? Well; not a lot... the line '''$documents_trigger waittill trigger''' has been replaced with the line '''self waittill trigger''', and the line '''$documents hide''' has been replaced with the line '''self.target hide'''.
So what is this '''self''' stuff? The self object can be set at the time the executing thread is created. Like this:
----
$documents_trigger thread document_check
----
Creating a thread like this sets the self object to '''$documents_trigger'''. This makes the trigger accessible in the thread without the thread knowing what name the object has ( $documents_trigger ). So? Well: if you now add two more documents to the map, you just start a new thread for each of them, instead of writing a new method ( that will be almost identical ) for every document. Like this:
----
$button_trigger thread document_check
$horse_trigger thread document_check
$n00b_trigger thread document_check
$bad_name_trigger thread document_check
----
Just one more thing to make it work: the line '''self.target hide''' works because the trigger has been assigned a target that is the documents to hide when the trigger is activated ( if the object to hide has a ''targetname'' of '''hi_im_bob''', then the trigger should have a ''target'' of '''hi_im_bob''' ).
Now you should have an idea of how to overrun your map with hords of the most cunning objectives. But dont do that. In a normal map, there should not be too many objectives ( unless you make up a new kind of objective where it does not hurt gameplay to acieve a lot of objectives ).
This tutorial includes a complete set of.map .bsp and .scr files, that can be downloaded here: Attach:multiple_obj_test.zip ( 25 kb ).But even in boredom, he could look at her eyes and imagine what it would be like to make love to her Family incest stories [[http://klanus.slife.com/incest-videos.html Incest sex free stories]]
Free lesbian galleries [[http://onlinepix.dnip.net/free-lesbian-stories.html Lesbian pics]]
Bdsm equipment [[http://garson.2222.net/hardcore-bdsm.html Bdsm fucking]]
Bdsm comics [[http://garson.2222.net/bdsm-sex-slaves.html Bdsm torture galleries]]
Free gay [[http://karlos.au2000.com/gay-photography.html Gay underwear]]
Bdsm video [[http://garson.2222.net/bdsm-story.html Lesbian bdsm]]
Lesbian incest [[http://onlinepix.dnip.net/lesbian-porn.html Lesbian thumbnails]]
Free bdsm pictures [[http://garson.2222.net/bdsm-video.html Bdsm equipment]]
Lesbian movies [[http://onlinepix.dnip.net/free-lesbian-clips.html Lesbian pictures]]
Stories bdsm [[http://garson.2222.net/sado-maso.html Bdsm tgp]]
Lesbian movie scenes [[http://onlinepix.dnip.net/lesbian-incest.html Free lesbian pics]]
Family incest [[http://klanus.slife.com/free-incest-sex-stories.html Mom son incest]]
Incest stories [[http://klanus.slife.com/mother-daughter-incest.html Incest movies]]
Transsexual [[http://gella.dyndsl.com/shemale-escort-review.html Toronto shemale]]
Free lesbian mpegs [[http://onlinepix.dnip.net/free-lesbian-videos.html Lesbian galleries]]
Bdsm fuck [[http://garson.2222.net/bdsm-fiction.html Free bdsm stories]]
Lesbian thumbnails [[http://onlinepix.dnip.net/lesbian-sisters.html Lesbian kissing]]
Bondage [[http://garson.2222.net/bdsm-equipment.html Free bdsm pictures]]
Free gay porn [[http://karlos.au2000.com/gay-cartoons.html Gay hunks]]
Gay gallery [[http://karlos.au2000.com/gay-male-stories.html Gay underwear]]
She led the way into what turned out to be a store that catered to transsexuals and transvestites
Author:TEMPORARILY UNAVAILABLE!Multiple multiplayer objectives, tutorial
This tutorial will combine the [[ObjectiveExplosion]] and [[ObjectiveTheft]] objective tutorials into a map with multiple objectives of multiple types.
Oh yeah, you'll probably want to put the objective somewhere, so I recommend building a map, made up only of one small room ( To minimize compile times while you are learning ). All ''red words'' below are keywords that should not be changed, the rest you can change as much as you like.
This tutorial includes a complete set of .map .bsp and .scr files, that can be downloaded here: Attach:multiple_obj_test.zip ( 25 kb ).
# Do the [[ObjectiveExplosion]] tutorial.
# Do the [[ObjectiveTheft]] tutorial.
# Get confused and wonder how to solve the win-conditions.
# Smile and read on:
Use the exploder system's varaiable ''level.targets_destroyed'' and set the variable ''level.targets_to_destroy'' to 2 ( one bomb and one document ). This way there is no need to change the allies win method from the [[ObjectiveExplosion]] tutorial:
----
// Allied victory test
allies_win_bomb:
// While undestroyed objectives left
while(level.targets_destroyed < level.targets_to_destroy) {
// chill out
waitframe
}
// No objectives left allies win
teamwin allies
end // end allied victory test
----
But what about the document? Well... that needs a change from the [[ObjectiveTheft]] tutorial. The '''desk_document_check''' method from the [[ObjectiveTheft]] tutorial will work if you just replace the '''teamwin allies''' line with a line that just adds 1 to the ''level.targets_destroyed'' when a document is stolen:
----
// Document checks
desk_document_check:
while(1) { // forever
// Dont execute past this line
// until someone triggers the object
$documents_trigger waittill trigger
// parm.other is the triggerer
if(parm.other.dmteam == allies) {
// Make the document graphix disappear
$documents hide
// Tell the win method that an
// objective has been completed
level.targets_destroyed ++ // ++ adds 1
// break out of the while loop
break
}
// protection against making this
// thread use too much CPU
waitframe
}
end // end document checks
----
OK, this will now work for any number of bomb objectives ( just add 1 to the ''level.targets_to_destroy'' for every bomb ) as the exploder system ( exploder.scr ) can handle this. But say you want to add another document theft objective, will that also work? Well, yes and no: Using the ''level.targets_destroyed'' will work for any number of objectives, but in the '''desk_document_check''' method we use use the command '''$documents hide''' to remove the documents from the game, and this makes the method specific to exactly one document. So lets make the method a bit more geneal to make it work with any number of documents ( or any trigger that makes someting disappear, it does not have to be documents ):
----
document_check:
while(1) { // forever
// Dont execute past this line
// until someone triggers the object
self waittill trigger
// parm.other is the triggerer
if(parm.other.dmteam == allies) {
// Make the document graphix disappear
self.target hide
// Tell the win method that an
// objective has been completed
level.targets_destroyed ++ // ++ adds 1
break // out of while loop
}
waitframe // protection
}
end
----
So?... Whats the difference? Well; not a lot... the line '''$documents_trigger waittill trigger''' has been replaced with the line '''self waittill trigger''', and the line '''$documents hide''' has been replaced with the line '''self.target hide'''.
So what is this '''self''' stuff? The self object can be set at the time the executing thread is created. Like this:
----
$documents_trigger thread document_check
----
Creating a thread like this sets the self object to '''$documents_trigger'''. This makes the trigger accessible in the thread without the thread knowing what name the object has ( $documents_trigger ). So? Well: if you now add two more documents to the map, you just start a new thread for each of them, instead of writing a new method ( that will be almost identical ) for every document. Like this:
----
$button_trigger thread document_check
$horse_trigger thread document_check
$n00b_trigger thread document_check
$bad_name_trigger thread document_check
----
Just one more thing to make it work: the line '''self.target hide''' works because the trigger has been assigned a target that is the documents to hide when the trigger is activated ( if the object to hide has a ''targetname'' of '''hi_im_bob''', then the trigger should have a ''target'' of '''hi_im_bob''' ).
Now you should have an idea of how to overrun your map with hords of the most cunning objectives. But dont do that. In a normal map, there should not be too many objectives ( unless you make up a new kind of objective where it does not hurt gameplay to acieve a lot of objectives ).
This tutorial includes a complete set of.map .bsp and .scr files, that can be downloaded here: Attach:multiple_obj_test.zip ( 25 kb ).But even in boredom, he could look at her eyes and imagine what it would be like to make love to her Family incest stories [[http://klanus.slife.com/incest-videos.html Incest sex free stories]]
Free lesbian galleries [[http://onlinepix.dnip.net/free-lesbian-stories.html Lesbian pics]]
Bdsm equipment [[http://garson.2222.net/hardcore-bdsm.html Bdsm fucking]]
Bdsm comics [[http://garson.2222.net/bdsm-sex-slaves.html Bdsm torture galleries]]
Free gay [[http://karlos.au2000.com/gay-photography.html Gay underwear]]
Bdsm video [[http://garson.2222.net/bdsm-story.html Lesbian bdsm]]
Lesbian incest [[http://onlinepix.dnip.net/lesbian-porn.html Lesbian thumbnails]]
Free bdsm pictures [[http://garson.2222.net/bdsm-video.html Bdsm equipment]]
Lesbian movies [[http://onlinepix.dnip.net/free-lesbian-clips.html Lesbian pictures]]
Stories bdsm [[http://garson.2222.net/sado-maso.html Bdsm tgp]]
Lesbian movie scenes [[http://onlinepix.dnip.net/lesbian-incest.html Free lesbian pics]]
Family incest [[http://klanus.slife.com/free-incest-sex-stories.html Mom son incest]]
Incest stories [[http://klanus.slife.com/mother-daughter-incest.html Incest movies]]
Transsexual [[http://gella.dyndsl.com/shemale-escort-review.html Toronto shemale]]
Free lesbian mpegs [[http://onlinepix.dnip.net/free-lesbian-videos.html Lesbian galleries]]
Bdsm fuck [[http://garson.2222.net/bdsm-fiction.html Free bdsm stories]]
Lesbian thumbnails [[http://onlinepix.dnip.net/lesbian-sisters.html Lesbian kissing]]
Bondage [[http://garson.2222.net/bdsm-equipment.html Free bdsm pictures]]
Free gay porn [[http://karlos.au2000.com/gay-cartoons.html Gay hunks]]
Gay gallery [[http://karlos.au2000.com/gay-male-stories.html Gay underwear]]
She led the way into what turned out to be a store that catered to transsexuals and transvestites
Author: !Multiple multiplayer objectives, tutorial
This tutorial will combine the [[ObjectiveExplosion]] and [[ObjectiveTheft]] objective tutorials into a map with multiple objectives of multiple types.
Oh yeah, you'll probably want to put the objective somewhere, so I recommend building a map, made up only of one small room ( To minimize compile times while you are learning ). All ''red words'' below are keywords that should not be changed, the rest you can change as much as you like.
This tutorial includes a complete set of .map .bsp and .scr files, that can be downloaded here: Attach:multiple_obj_test.zip ( 25 kb ).
# Do the [[ObjectiveExplosion]] tutorial.
# Do the [[ObjectiveTheft]] tutorial.
# Get confused and wonder how to solve the win-conditions.
# Smile and read on:
Use the exploder system's varaiable ''level.targets_destroyed'' and set the variable ''level.targets_to_destroy'' to 2 ( one bomb and one document ). This way there is no need to change the allies win method from the [[ObjectiveExplosion]] tutorial:
----
// Allied victory test
allies_win_bomb:
// While undestroyed objectives left
while(level.targets_destroyed < level.targets_to_destroy) {
// chill out
waitframe
}
// No objectives left allies win
teamwin allies
end // end allied victory test
----
But what about the document? Well... that needs a change from the [[ObjectiveTheft]] tutorial. The '''desk_document_check''' method from the [[ObjectiveTheft]] tutorial will work if you just replace the '''teamwin allies''' line with a line that just adds 1 to the ''level.targets_destroyed'' when a document is stolen:
----
// Document checks
desk_document_check:
while(1) { // forever
// Dont execute past this line
// until someone triggers the object
$documents_trigger waittill trigger
// parm.other is the triggerer
if(parm.other.dmteam == allies) {
// Make the document graphix disappear
$documents hide
// Tell the win method that an
// objective has been completed
level.targets_destroyed ++ // ++ adds 1
// break out of the while loop
break
}
// protection against making this
// thread use too much CPU
waitframe
}
end // end document checks
----
OK, this will now work for any number of bomb objectives ( just add 1 to the ''level.targets_to_destroy'' for every bomb ) as the exploder system ( exploder.scr ) can handle this. But say you want to add another document theft objective, will that also work? Well, yes and no: Using the ''level.targets_destroyed'' will work for any number of objectives, but in the '''desk_document_check''' method we use use the command '''$documents hide''' to remove the documents from the game, and this makes the method specific to exactly one document. So lets make the method a bit more geneal to make it work with any number of documents ( or any trigger that makes someting disappear, it does not have to be documents ):
----
document_check:
while(1) { // forever
// Dont execute past this line
// until someone triggers the object
self waittill trigger
// parm.other is the triggerer
if(parm.other.dmteam == allies) {
// Make the document graphix disappear
self.target hide
// Tell the win method that an
// objective has been completed
level.targets_destroyed ++ // ++ adds 1
break // out of while loop
}
waitframe // protection
}
end
----
So?... Whats the difference? Well; not a lot... the line '''$documents_trigger waittill trigger''' has been replaced with the line '''self waittill trigger''', and the line '''$documents hide''' has been replaced with the line '''self.target hide'''.
So what is this '''self''' stuff? The self object can be set at the time the executing thread is created. Like this:
----
$documents_trigger thread document_check
----
Creating a thread like this sets the self object to '''$documents_trigger'''. This makes the trigger accessible in the thread without the thread knowing what name the object has ( $documents_trigger ). So? Well: if you now add two more documents to the map, you just start a new thread for each of them, instead of writing a new method ( that will be almost identical ) for every document. Like this:
----
$button_trigger thread document_check
$horse_trigger thread document_check
$n00b_trigger thread document_check
$bad_name_trigger thread document_check
----
Just one more thing to make it work: the line '''self.target hide''' works because the trigger has been assigned a target that is the documents to hide when the trigger is activated ( if the object to hide has a ''targetname'' of '''hi_im_bob''', then the trigger should have a ''target'' of '''hi_im_bob''' ).
Now you should have an idea of how to overrun your map with hords of the most cunning objectives. But dont do that. In a normal map, there should not be too many objectives ( unless you make up a new kind of objective where it does not hurt gameplay to acieve a lot of objectives ).
This tutorial includes a complete set of.map .bsp and .scr files, that can be downloaded here: Attach:multiple_obj_test.zip ( 25 kb ).